<?php 
/**
 * @author Eugenio Fage
 * http://eugeniofage.wordpress.com/
 * http://code.google.com/p/monky/
 * 
 */

$facebookLink='';
if(Configure::read('Facebook.appSecret')){
	$facebookIcon=$this->Html->tag('span','',array('class'=>'icon32 facebook32'));
	$facebookLink=$this->Html->link(
		sprintf(__('%s login using facebook',true),$facebookIcon),
		array('controller'=>'users','action'=>'facebook_connect'),
		array('escape'=>false));
}
	
$twitterLink='';

if(Configure::read('Twitter.secret')){
	$twitterIcon=$this->Html->tag('span','',array('class'=>'icon32 twitter32'));
	$twitterLink=$this->Html->link(
		sprintf(__('%s login using twitter',true),$twitterIcon),
		array('controller'=>'users','action'=>'twitter_connect'),
		array('escape'=>false));
}

if(!$this->Session->check('Auth.id')){
	echo $this->Html->tag('div',$facebookLink.$twitterLink,array('class'=>'thirdPartyLogin'));
}